package org.liveboardgames.agricola.access.hibernate;

import org.liveboardgames.agricola.access.IFarmDao;
import org.liveboardgames.agricola.domain.farm.Farm;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class FarmHibernateDao extends HibernateDaoSupport implements IFarmDao {

  public Farm load(Long farmId) {
    Farm farm = (Farm)getHibernateTemplate().load(Farm.class, farmId);
    return farm;
  }

  public void save(Farm farm) {
    getHibernateTemplate().saveOrUpdate(farm);
  }

}
